<template>
  <div class="q-pa-md">
    <t-slider
      ref="myComponent"
      class="tr-slider-form"
      v-model="value"
      :disable="false"
      color="#f33"
      :inner-min="-16"
      :inner-max="12"
      :min="-20"
      :max="20"
      :readonly="false"
      :step="2"
      :markers="true"
      :markerStep="4"
      :marker-labels="v => v + '℃'"
      :label-value="value + '度'"
      :show-label="true"
      :label-always="true"
      :tabIndex="1"
      :visible="true"
      label="划了划了"
      :hideLabel="false"
      labelPosition="top"
      required
      required-message="评分是必填的哦评分是必填的哦评分是必填的哦评分是必填的哦评分是必填的哦评分是必填的哦评分是必填的哦评分是必填的哦评分是必填的哦评分是必填的哦评分是必填的哦"
      popLabelPosition="bottom"
      markerPosition="top"
    />
  </div>

  <div class="btn" @click="$refs.myComponent.validate()">点击校验</div>
</template>

<script>
import { ref } from 'vue';

export default {
  setup() {
    return {
      value: ref(null),
    };
  },
};
</script>
